#include "register.h"

Register::Register(QWidget *parent)
    : QWidget(parent)
{
    QVBoxLayout *layout = new QVBoxLayout(this);

    usernameEdit = new QLineEdit(this);
    usernameEdit->setPlaceholderText("Username");
    layout->addWidget(usernameEdit);

    phoneEdit = new QLineEdit(this);
    phoneEdit->setPlaceholderText("Phone");
    layout->addWidget(phoneEdit);

    passwordEdit = new QLineEdit(this);
    passwordEdit->setPlaceholderText("Password");
    passwordEdit->setEchoMode(QLineEdit::Password);
    layout->addWidget(passwordEdit);

    confirmPasswordEdit = new QLineEdit(this);
    confirmPasswordEdit->setPlaceholderText("Confirm Password");
    confirmPasswordEdit->setEchoMode(QLineEdit::Password);
    layout->addWidget(confirmPasswordEdit);

    QPushButton *registerButton = new QPushButton("Register", this);
    connect(registerButton, &QPushButton::clicked, this, &Register::registerUser);
    layout->addWidget(registerButton);

    setLayout(layout);
}
void Register::registerUser() {
        // 实现注册逻辑
    }
